package com.zjj.lbw.ai;

public class ClientStdio {

    public static void main(String[] args) {

//        var stdioParams = ServerParameters.builder("java")
//                .args("-Dspring.main.web-application-type=none", "-jar", "/Users/dadudu/idea/java/spring-ai-mcp-server-demo/target/spring-ai-mcp-server-demo-1.0-SNAPSHOT.jar")
//                .build();
//
//        var transport = new StdioClientTransport(stdioParams);
//        var client = McpClient.sync(transport).build();
//
//        client.initialize();
//
//        // List and demonstrate tools
//        McpSchema.ListToolsResult toolsList = client.listTools();
//        System.out.println("Available Tools = " + toolsList);
//
//        McpSchema.CallToolResult weatherResult = client.callTool(new McpSchema.CallToolRequest("getWeather",
//                Map.of("cityName", "北京")));
//        System.out.println("结果: " + weatherResult);
//
//        client.closeGracefully();
    }
}
